package com.wgts.wgts.dagger.module;

import com.wgts.wgts.dagger.scope.ActivityScope;
import com.wgts.wgts.mvp.model.IContinuePayActivityModel;
import com.wgts.wgts.mvp.model.IGetUserInfoModel;
import com.wgts.wgts.mvp.model.imp.ContinuePayActivityModel;
import com.wgts.wgts.mvp.model.imp.GetUserInfoModel;
import com.wgts.wgts.mvp.presenter.IContinuePayActivityPresenter;
import com.wgts.wgts.mvp.presenter.imp.ContinuePayActivityPresenter;
import com.wgts.wgts.mvp.view.IContinuePayActivityView;
import com.wgts.wgts.netmodle.NetService;

import dagger.Module;
import dagger.Provides;

/*
 *
 *
 *   data:2018/10/910:19
 *
 */
@Module
public class ContinuePayActivityModule {
    private IContinuePayActivityView view;

    public ContinuePayActivityModule(IContinuePayActivityView view) {
        this.view = view;
    }

    @ActivityScope
    @Provides
    public IContinuePayActivityView provideView(){
        return view;
    }

    @ActivityScope
    @Provides
    public IContinuePayActivityModel provideModel(NetService netService){
        return new ContinuePayActivityModel(netService);
    }

    @ActivityScope
    @Provides
    public IGetUserInfoModel provideUseIfoModel(NetService netService){
        return new GetUserInfoModel(netService);
    }

    @ActivityScope
    @Provides
    public IContinuePayActivityPresenter providePresenter(IContinuePayActivityView view, IContinuePayActivityModel model, IGetUserInfoModel userInfoModel){
        return new ContinuePayActivityPresenter(view, model, userInfoModel);
    }
}
